<?php
echo "<title>特码大单警示</title>\r\n\r\n";
if ( !defined( "IN_OP" ) )
{
    exit( "You can't access this file directly..." );
}
$ui = new UI();
$conf = new Config();
$lotto_id = intval( $_GET['id'] );
$mode = intval( $_GET['mod'] );
$maxbet_hint = intval( $conf->get( "max_bat_hint" ) );
$sound_mode = intval( $conf->get( "alert_sound" ) );
$hint_mode = 0;
if ( 0 < $maxbet_hint )
{
    $chktimer = systime( ) - 28;
    $sql = "select * from bet where lotto_id=".$lotto_id." and bettype in (0,24) and (amount*upercent/100)>=".$maxbet_hint." and createtime>=".$chktimer." and rame=0 order by createtime desc, bettype, numbers";
    $rs = getdb( $sql );
    $movenext = !$rs->eof;
    if ( $movenext )
    {
        if ( $mode == 2 )
        {
            echo "<bgsound src='image/dindin".$sound_mode.".mp3' loop=1 />";
        }
        echo "<table width=420 border=1 cellpadding=2 cellspacing=0>";
        echo "<tr class=td0><td nowrap>序号 / 时间<td nowrap>会员代号 / 名称<td nowrap>下注内容<td nowrap>赔率<td nowrap>金额";
        while ( $movenext )
        {
            $idtems = $rs->f['id'];
            echo "<tr align=right class=td2 onmouseover=msover() onmouseout=msout() valign=top>";
            echo "<td nowrap><font color=#217952>".$rs->f['id']."</font> &nbsp; ".date( "m-d H:i:s", $rs->f['createtime'] );
            $rst = getdb( "select id,account,name from k_user where id=".$rs->f['user_id'] );
            echo "<td nowrap>".$rst->f[1]." &nbsp; <font color=#217952>".$rst->f[2]."</font>";
            echo "<td nowrap>".GetBetContent( $rs->f['bettype'], $rs->f['numbers'], $rs->f['amount'] );
            echo "<td nowrap>".show_rate( $rs->f['bettype'], $rs->f['rate'] );
            echo "<td nowrap>".$rs->f['amount']."</td>";
            $rs->movenext();
            $movenext = !$rs->eof;
        }
        echo "</tr></table>";
        echo "<table width=420 border=0 cellpadding=10 cellspacing=0>";
        echo "<tr align=center><td>";
        echo "<input type=button value='&#12288;关&#12288;闭&#12288;' onclick=\"window.close()\"></td></tr>";
        echo "</td></tr></table>";
        echo "<script>";
        echo "setTimeout(\"window.close()\",12000);";
        echo "</script>";
    }
    else
    {
        echo "<script>";
        echo "window.close();";
        echo "</script>";
    }
}
else
{
    echo "<script>";
    echo "window.close();";
    echo "</script>";
}
?>